<template>
  <div class="header-bg">
    <div class="hed-left">
      <i class="el-icon-s-home"></i>
    </div>
    <div class="hed-left">
      后台管理系统
    </div>

    <div class="hed-right">
      <el-dropdown>
        <span class="el-dropdown-link">
          欢迎你 {{username}}<i class="el-icon-arrow-down el-icon--right"></i>
        </span>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>退出</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>

    <div style="height: 60px" class="hed-right">
        <el-avatar style="margin-top: 10px;" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar>
    </div>
  </div>
</template>

<script>

  export default {
    name: "Header",
    data(){
      return{

        username: this.$store.getters.getUser.username
      }
    }
  }
</script>

<style scoped>
  .header-bg {
    background-color: rgb(36, 47, 66);
    line-height: 60px;
    overflow: hidden;
  }

  .header-bg > .hed-left {
    font-size: 22px;
    margin-left: 25px;
    float: left;
    color: white;
  }

  .header-bg > .hed-right {
    float: right;
    margin-right: 15px;
  }

  .el-dropdown-link {
    cursor: pointer;
    color: white;
    font-size: 15px;
  }

  .el-icon-arrow-down {
    font-size: 15px;
  }
</style>
